package com.andyage.admin.action;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.andyage.admin.service.IAdfodderService;
import com.andyage.admin.bean.AdfodderBean;

@Controller
public class AdFodderAction {
	@Resource
	private IAdfodderService iadfodderService;
	@RequestMapping("/queryAllAdfodderInfo")
	public void queryAllAdfodderInfo(AdfodderBean adfdderbean,HttpServletRequest request,HttpServletResponse response) {
		try {
			iadfodderService.queryAllAdfodderInfo(adfdderbean, request, response);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	@RequestMapping("/insertAdfodder")
	public void insertAdfodder(AdfodderBean adfdderbean,HttpServletRequest request,HttpServletResponse response) {
		try {
			iadfodderService.insertAdfodder( request, response);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
	@RequestMapping("/updateAdfodder")
	public void updateAdfodder(AdfodderBean adfdderbean,HttpServletRequest request,HttpServletResponse response) {
		try {
			iadfodderService.updateAdfodder(adfdderbean, request, response);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	@RequestMapping("/deleteAdfodder")
	public void deleteAdfodder(AdfodderBean adfdderbean,HttpServletRequest request,HttpServletResponse response) {
		try {
			iadfodderService.deleteAdfodder(request, response);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
